package com.event.management.backend.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.math.BigDecimal;
import java.util.List;

/**
 * 销售趋势数据传输对象
 */
@Data
@ApiModel(value = "销售趋势", description = "按时间维度的销售趋势数据")
public class SalesTrendDTO {
    
    @ApiModelProperty(value = "活动ID")
    private Long eventId;
    
    @ApiModelProperty(value = "数据范围", example = "7d")
    private String range;
    
    @ApiModelProperty(value = "销售数据点列表")
    private List<SalesDataPoint> dataPoints;
    
    @ApiModelProperty(value = "总销售额")
    private BigDecimal totalSales;
    
    @ApiModelProperty(value = "平均每日销售额")
    private BigDecimal averageDailySales;
    
    @ApiModelProperty(value = "最高销售额")
    private BigDecimal peakSales;
    
    @ApiModelProperty(value = "最高销售日期/时间")
    private String peakTime;
    
    /**
     * 销售数据点
     */
    @Data
    public static class SalesDataPoint {
        @ApiModelProperty(value = "时间点", example = "2023-05-01")
        private String timePoint;
        
        @ApiModelProperty(value = "销售数量")
        private Integer count;
        
        @ApiModelProperty(value = "销售金额")
        private BigDecimal amount;
    }
} 